<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/** @var $block \Magento\UrlRewrite\Block\Catalog\Category\Tree */
?>
<fieldset class="fieldset" data-ui-id="category-selector">
    <legend class="legend"><span><?php /* @escapeNotVerified */ echo __('Select Category') ?></span></legend>
    <div class="content" style="clear: both;">
        <input type="hidden" name="categories" id="product_categories" value="" />
        <?php if ($block->getRoot()): ?>
        <div data-mage-init="<?php
            echo $block->escapeHtml($this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode([
                'categoryTree' => [
                    'data' => $block->getTreeArray(null),
                    'url' => $block->getLoadTreeUrl(),
                ],
            ]));
        ?>" class="jstree-default"></div>
        <?php endif; ?>
    </div>
</fieldset>
